﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SFP
{
    public class FreqTimer
    {
        public double Frequency { get; set; }
        private double passedTime = 0;

        public FreqTimer(double frequency)
        {
            Frequency = frequency;
        }

        public bool check(double time)
        {
            passedTime += time;

            if (passedTime >= Frequency)
            {
                passedTime -= Frequency;
                return true;
            }

            return false;
        }
    }
}
